<%@ page contentType="text/html;charset=utf-8" language="java" import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<jsp:useBean id="dbConnection" scope="session" class="DB.DBConnection"/>
<%
request.setCharacterEncoding("utf-8");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>公告修改</title>
    <script type="text/javascript" src="admin.js"></script>
  </head>
  <script>
<%	String id=request.getParameter("id");%>
	var id=<%=id%>
	if(id=0){
		add();
	}
	else{
		change1();
	}
	else {return false;}
function add(){
<%	
	String user=(String)session.getAttribute("username");
	java.util.Date ntime=new java.util.Date();
	long nowtime=ntime.getTime();  
	java.sql.Date nowdate=new java.sql.Date(nowtime); 
	Calendar cal = Calendar.getInstance();
	SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  	String mDateTime=formatter.format(cal.getTime());
%>
}
function change1(){

}
  </script> 	
  <body>
  <center>
  <form name="form1" action="changeaction.jsp">
  <table width="210" border="1">
    <tr>
      <td colspan="2" align="center">公告</td>
    </tr>
    <tr>
      <td width="35%" height="60">管理员：<%=user%></td>
      <td width="65%" height="60">时间：<%=mDateTime %></td>
    </tr>
    <tr>
      <td height="200" colspan="2"><textarea name="textarea" cols=" " rows="10"></textarea>
      </td>
    </tr>
    <tr>
      <td height="25" colspan="2" align="center"><input type="submit" name="Submit" value="确定"/></td>    
    </tr>
    <tr>
      <td height="23" colspan="2">Copyright for 209ChatRoom</td>
    </tr>
  </table>
  </form>
  </center>
  </body>
</html>
